#include <bits/stdc++.h>
using namespace std;
using uint=unsigned int;
using ll=long long;
using ull=unsigned long long;
using i128=__int128;
const int N=1e3+5;

void solve(){
    int n,d;
    cin>>n>>d;
    int a[N]={0},b[N]={0}; //a数组存储第几天存入哪个罐子，b数组为罐子
    for(int i=1;i<=d;i++){
        cin>>a[i];
    }
    for(int i=1;i<=d;i++){
        b[a[i]]+=i;
    }
    for(int i=0;i<n;i++){
        if(i<n-1)cout<<b[i]<<" ";
        else cout<<b[i]<<endl;
    }
    return;
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    solve();

    return 0;
}